package com.frank.easyexcel.model.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.frank.easyexcel.converter.ExportLocalDateConverter;
import com.frank.easyexcel.converter.LocalDateConverter;
import com.frank.easyexcel.converter.LocalDateTimeConverter;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 小石潭记
 * @date 2020/10/7 21:10
 * @Description: ${todo}
 */
@Data
public class PersonDto {

    /** id */
    @ExcelProperty(index = 0 , value = "id")
    private String id;
    /** 姓名 **/
    @ExcelProperty(index = 1 , value = "姓名")
    private String name;
    /** 生日 **/
//    @ExcelProperty(index = 2 , value = "生日" , format = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(index = 2 , value = "生日" , converter = LocalDateTimeConverter.class)
    private LocalDateTime birth;

    @ExcelProperty(index = 3 , value = "创建时间" , converter = ExportLocalDateConverter.class)
    private LocalDate createDate;

}
